<template>
	<view class="container">
		<!-- 页面标题 -->
		<view class="page-header">
			<text class="header-title">功能导航</text>
			<text class="header-desc">选择您需要使用的功能</text>
		</view>
		
		<!-- 功能按钮网格 -->
		<view class="btn-grid">
			<!-- 跳转到登录注册页面的按钮 -->
			<button class="func-btn" @click="navToLogin">
				<view class="btn-icon">🔐</view>
				<view class="btn-text">登录注册</view>
			</button>
			
			<!-- 城市探索按钮 -->
			<button class="func-btn" @click="navToCityExplore">
				<view class="btn-icon">🏙️</view>
				<view class="btn-text">城市探索</view>
			</button>
			
			<!-- 组件显示页面 -->
			<button class="func-btn" @click="navToComponentShow">
				<view class="btn-icon">🧩</view>
				<view class="btn-text">组件展示</view>
			</button>
			
			<!-- 新闻页面 -->
			<button class="func-btn" @click="navToNewsPage">
				<view class="btn-icon">📰</view>
				<view class="btn-text">新闻资讯</view>
			</button>
			
			<!-- ui-app1 -->
			<button class="func-btn" @click="navToUiApp1">
				<view class="btn-icon">🎨</view>
				<view class="btn-text">UI应用</view>
			</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			// 跳转到登录页面的方法
			navToLogin() {
				uni.navigateTo({
					url: '/pages/index/auth/login'
				})
			},
			
			// 跳转到城市探索页面的方法
			navToCityExplore() {
				uni.navigateTo({
					url: '/pages/tabBar/case/table'
				})
			},
			
			// 跳转到组件显示页面的方法
			navToComponentShow() {
				uni.navigateTo({
					url: '/pages/tabBar/cardViewPage/cardViewPage'
				})
			},
			
			// 跳转到新闻页面的方法
			navToNewsPage() {
				uni.navigateTo({
					url: '/pages/tabBar/NewsPage/NewsPage'
				})
			},
			
			// 跳转到ui-app1页面的方法
			navToUiApp1() {
				uni.navigateTo({
					url: '/pages/tabBar/case/ui-app1/ui-app1'
				})
			}
		}
	}
</script>

<style>
.container {
	padding: 30rpx;
	background-color: #f9f7ff;
	min-height: 100vh;
	box-sizing: border-box;
}

/* 页面头部 */
.page-header {
	text-align: center;
	margin: 40rpx 0 60rpx;
}

.header-title {
	font-size: 42rpx;
	font-weight: 600;
	color: #5b21b6;
	display: block;
	margin-bottom: 15rpx;
	letter-spacing: 1rpx;
}

.header-desc {
	font-size: 28rpx;
	color: #8b5cf6;
	opacity: 0.8;
}

/* 按钮网格布局 */
.btn-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30rpx;
}

/* 功能按钮样式 */
.func-btn {
	background-color: #fff;
	border: none;
	border-radius: 20rpx;
	padding: 35rpx 20rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: 0 5rpx 15rpx rgba(139, 92, 246, 0.08);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

/* 按钮hover效果 */
.func-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.05), transparent);
	transition: all 0.5s ease;
}

.func-btn:hover::before {
	left: 100%;
}

.func-btn:active {
	transform: translateY(3rpx);
	box-shadow: 0 3rpx 10rpx rgba(139, 92, 246, 0.1);
}

/* 按钮图标 */
.btn-icon {
	font-size: 60rpx;
	margin-bottom: 20rpx;
	transition: transform 0.3s ease;
}

.func-btn:hover .btn-icon {
	transform: scale(1.1);
}

/* 按钮文字 */
.btn-text {
	font-size: 30rpx;
	color: #5b21b6;
	font-weight: 500;
}
</style>